class Person():
    __name="tom"
    __age=21
    def set_name(self,name):
        self.__name=name
    def get_name(self):
        return self.__name
    name=property(get_name,set_name)
    @property
    def age(self):
        return self.__age
    @age.setter
    def age(self,age):
        self.__age=age

xm=Person()
xm.name="小明"
print(xm.name)
xm.age=28
print(xm.age)